Apply fancy indexing after dark subtraction#904
Merged
Conversation
`pull_spots()` performs fancy indexing on the imageseries [here](https://github.com/HEXRD/hexrd/blob/625a7950e61aa63f528b343dcc8e82c3b9d9f5f4/hexrd/core/instrument/hedm_instrument.py#L1932). If a `ProcessedImageSeries` was used that had dark background subtraction first, then the fancy indexing would cause errors to occur. The reason was that the fancy indexing was being performed *before* the dark background subtraction, which meant that the fancy indexed image would not have a shape that matched the dark background subtraction. We need to delay fancy indexing until after all operations have finished, so that the fancy indexing doesn't interfere with them. This PR fixes the issue. Fixes: #903 Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #904 +/- ##
==========================================
- Coverage 70.90% 70.90% -0.01%
==========================================
Files 143 143
Lines 22064 22063 -1
==========================================
- Hits 15645 15644 -1
Misses 6419 6419 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
pull_spots()performs fancy indexing on the imageseries here.If a
ProcessedImageSerieswas used that had dark background subtraction, then the fancy indexing would cause errors to occur. The reason was that the fancy indexing was being performed before the dark background subtraction, which meant that the fancy indexed image would not have a shape that matched the dark background image.We need to delay fancy indexing until after all operations have finished, so that the fancy indexing doesn't interfere with them. This PR fixes the issue.
Fixes: #903
A test was included that verifies this issue is fixed.
Affected Workflows
HEDM
Documentation Changes
No documentation needed.